package com.rhit.rosehack.engine;

import com.rhit.rosehack.SQLObjects.Creature;

//This class represents the player character. 
public class Player extends Creature 
{

	public Player() 
	{
		this.setX(1);
		this.setY(1);
		this.setAttack(5);
		this.setDefense(5);
		this.setMagic(5);
		this.setHP(50);
		this.setMP(0);
		this.setName("DefaultName");
	}

	public String fight(Mob m) 
	{
		m.setHP(m.effectiveHP() - this.effectiveAttack());
		
		int took = 0;
		if(m.effectiveAttack()- this.effectiveDefense() > 0)
			took = m.effectiveAttack()- this.effectiveDefense();
			
			this.setHP(this.effectiveHP() - took);

		return "Dealt " + this.effectiveAttack() + " Damage. Took " + took + " Damage";
	}

	@Override
	public void checkLevel() 
	{
		// TODO Auto-generated method stub
	}

}
